ComponentOne ADO.NET DataExtender
C1.C1DataExtender.2 Assembly / C1.C1DataExtender Namespace / C1DataView Class / Find Method / Find(String[],Object[]) Method
An array of column names to search on.
An array of values of the columns specified in the columnNames parameter. The length and order of values must correspond to column names specified in the columnNames parameter. If the System.Type of some array value differs from the C1ViewColumn.DataType of the corresponding column then this value will be converted to the column's target type automatically. In the case where such a conversion is impossible, an exception will be raised.

In This Topic
    Find(String[],Object[]) Method
    In This Topic
    Finds a row in this C1DataView by the specified values of the specified columns.
    Syntax
    'Declaration
     
    Public Overloads Function Find( _
       ByVal columnNames() As System.String, _
       ByVal columnValues() As System.Object _
    ) As System.Integer
    public System.int Find( 
       System.string[] columnNames,
       System.object[] columnValues
    )

    Parameters

    columnNames
    An array of column names to search on.
    columnValues
    An array of values of the columns specified in the columnNames parameter. The length and order of values must correspond to column names specified in the columnNames parameter. If the System.Type of some array value differs from the C1ViewColumn.DataType of the corresponding column then this value will be converted to the column's target type automatically. In the case where such a conversion is impossible, an exception will be raised.

    Return Value

    An index of found row or -1 if row has not been found.
    Remarks
    This method investigates the passed set of columns before performing a search. If columnNames matches subkey of primary key or sort key then performs quick search by the corresponding key; otherwise, performs linear search.
    See Also